/*  PrimeBlaster
    by Kjetil Eide 
    kjetile445@gmail.com

    This file is part of PrimeBlaster

    PrimeBlaster is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    PrimeBlaster is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with PrimeBlaster.  If not, see <http://www.gnu.org/licenses/>.
*/

package org.eide.spaceship;

import org.newdawn.slick.geom.Vector2f;

public class VectorMath {

	public static float perpDotProd(Vector2f v1, Vector2f v2) {
		return -v1.y*v2.x + v1.x*v2.y;
	}
	
	public static Vector2f getPerp(Vector2f v) {
		return new Vector2f(-v.y, v.x);
	}
	
	float determinant(Vector2f vec1, Vector2f vec2){
	    return vec1.x*vec2.y-vec1.y*vec2.x;
	}

}
